'use strict';
function foo(){
    var a = 1;
    function adc(){
        var a = 'A';
        console.log('a in adc() =' + a);
    }
    console.log('a in foo() =' + a);
    console.log(adc());
}
console.log(foo());


function fas() {
    var x = 'Hello, ' + y;
    console.log(x);
    var y = 'Bob';
}
fas();



window.alert('调用window.alert()');
// 把alert保存到另一个变量:
var old_alert = window.alert;
// 给alert赋一个新函数:
window.alert = function () {}
alert('无法用alert()显示了!');
// 恢复alert:
window.alert = old_alert;
alert('又可以用alert()了!');


function fss() {
    var c = 0;
for (let i=0; i<100; i++) {
        c += i;
    }
i += 1;
}